package com.hp.service.impl;

import com.github.pagehelper.PageHelper;
import com.hp.entity.LoginInfor;
import com.hp.mapper.LoginInforMapper;
import com.hp.service.LoginInforService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LoginInforServiceImpl implements LoginInforService {

    @Resource
    LoginInforMapper loginInforMapper;

    @Override
    public List<LoginInfor> selectAll(String email, @Param("limit") Integer limit, @Param("page") Integer page) {
        PageHelper.startPage(page,limit);
        return loginInforMapper.selectAll(email);
    }

    @Override
    public int add(LoginInfor loginInfor) {
        return loginInforMapper.add(loginInfor);
    }
}
